home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 March / CHIP Mart 1997.iso / SurfCam / SURFCAM.Z / POSTFORM.E < prev    next >
Encoding:
Text File  |  1996-04-01  |  27.8 KB  |  1,146 lines

  1. name Agie EDM 2 Axis 
  2.  
  3. B 00 %
  4. L >4
  5. N 3
  6. G 2
  7. X -2>5 Inc
  8. x -2>5 X
  9. Y -2>5 Inc
  10. y -2>5 Y
  11. Z -3>4 Inc
  12. I 2>5
  13. J 2>5
  14. D >2
  15. T >2
  16.   Q ->3.>4
  17.   R ->3.>4
  18. M 2
  19. g 2 G
  20.  
  21. ModalGs                               # List of g codes that are modal
  22.  
  23. ModalLetters                          # List of letters that are modal
  24.  
  25. Sequence#s N 1 1 1                    # Char, freq, incr & start
  26. Spaces? N                             # Y or N  'Spaces between words     
  27. First#? N                             # Y or N  'Output 1st sequence no.  
  28.  
  29. HCode X                               # X or X U  'Horizontal char.       
  30. VCode Y                               # Y or Y V  'Vertical char.         
  31.  
  32. Spindle 3 4 5                         # Cw, ccw & stop m codes
  33. Coolant 8 9 7                         # On, Off & Mist m codes
  34. DComp 41 42 40                        # Left, Right & Cancel m codes
  35.  
  36. Incremental? Y                        # Y or N  'Inc or abs output
  37. CtrIncremental? Y                     # Y or N  'Inc or abs I & J
  38. ByQuadrants? Y                        # Y or N  'Break arcs at quadrants
  39.  
  40. Inc/Abs G 91 90                       # Inc & Abs char. & values
  41.  
  42. Work G                                # Work offset register
  43.  
  44. CtrCode I J                           # I J or R or I J K L
  45.  
  46. Feed G1                             # Linear move
  47. Rapid G0                            # Rapid positioning word
  48. Cw G2                               # Circular move clockwise
  49. Ccw G3                              # Circular move counter clockwise   
  50.  
  51. Tolerance .0001
  52.  
  53. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  54.  
  55. StartCode                             # Start of the program              
  56. B00
  57. End
  58.  
  59. 1stToolChange                         # First tool change
  60. G1 X[H] Y[V]
  61. D[DComp] T[Tool] g43
  62. End
  63.  
  64. RapidCode                             # Move between cuts.
  65. G1 X[H] Y[V]
  66. D[DComp] T[Tool] g43
  67. End
  68.  
  69. Infeed                                # Enable cutter comp
  70. G1 x[HVector] y[VVector] g44
  71. G1 X[H] Y[V] g40
  72. end
  73.  
  74. LineCode
  75. G1 X[H] Y[V] g[Side]
  76. end
  77.  
  78. Outfeed                               # Disable cutter comp
  79. G1 x[HVector] y[VVector] g44
  80. G1 X[H] Y[V] g40
  81. G45
  82. end
  83.  
  84. ToolChange                            # Secondary tool changes
  85. End
  86.  
  87. EndCode                               # End of the program
  88. M2
  89. B00
  90. End
  91.  
  92. name Charmilles EDM 2 Axis 
  93.  
  94. B 00 %
  95. L >4
  96. N 3
  97. G 2
  98. X -2>5
  99. Y -2>5
  100. Z -3>4
  101. I 2>5
  102. J 2>5
  103. Q ->3.>4
  104. R ->3.>4
  105. P ->3.>4
  106. K ->3.>4
  107. H >2
  108. D >2
  109. T >2
  110. M 2
  111. S >4
  112.  
  113. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85  # List of g codes that are modal    
  114.  
  115. ModalLetters                          # List of letters that are modal    
  116.  
  117. Sequence#s N 1 1 1                    # Char, freq, incr & start          
  118. Spaces? N                             # Y or N  'Spaces between words     
  119. First#? N                             # Y or N  'Output 1st sequence no.  
  120.  
  121. HCode X                               # X or X U  'Horizontal char.       
  122. VCode Y                               # Y or Y V  'Vertical char.         
  123.  
  124. Comment ( )                           # Begin End comment char.           
  125.  
  126. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  127. Coolant 8 9 7                         # On, Off & Mist m codes            
  128. DComp 41 42 40                        # Left, Right & Cancel m codes      
  129.  
  130. Incremental? Y                        # Y or N  'Inc or abs output        
  131. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  132. ByQuadrants? Y                        # Y or N  'Break arcs at quadrants  
  133.  
  134. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  135.  
  136. Work G                                # Work offset register              
  137.  
  138. CtrCode I J                           # I J or R or I J K L               
  139.  
  140. Feed G1                             # Linear move                       
  141. Rapid G0                            # Rapid positioning word            
  142. Cw G2                               # Circular move clockwise           
  143. Ccw G3                              # Circular move counter clockwise   
  144.  
  145. Tolerance .0001
  146.  
  147. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  148.  
  149. StartCode                             # Start of the program              
  150. B00
  151. End
  152.  
  153. 1stToolChange                         # First tool change                 
  154. End
  155.  
  156. Infeed                                # Enable cutter comp                
  157. G[Side] X[H] Y[V] D[DComp]
  158. end
  159.  
  160. Outfeed                               # Disable cutter comp               
  161. G40 X[H] Y[V]
  162. end
  163.  
  164. ToolChange                            # Secondary tool changes            
  165. End
  166.  
  167. EndCode                               # End of the program                
  168. M2
  169. B00
  170. End
  171.  
  172. name Elox EDM
  173.  
  174. % 00
  175. O 4
  176. N >4
  177. G 2
  178. X ->3.>5
  179. Y ->3.>5
  180. I ->3.>5
  181. J ->3.>5
  182. F >1.3
  183. H 2
  184. M 2
  185.  
  186. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85
  187.  
  188. Sequence#s N 1 1 1              
  189. First#? N
  190. Last#? N
  191.  
  192. HCode X 
  193. VCode Y 
  194. FeedCode F
  195.  
  196. Comment ( )             
  197.  
  198. Work G
  199.  
  200. Spindle 3 4 5           
  201. Coolant 8 9 7           
  202. DComp 41 42 40          
  203. LComp 43 49             
  204.  
  205. CtrIncremental? Y       
  206. ByQuadrants? N
  207. CtrCode I J 
  208. Spaces? Y
  209.  
  210. Feed G1
  211. Rapid G0
  212. Cw G2
  213. Ccw G3
  214.  
  215. Tolerance .0001
  216.  
  217. StartCode
  218. %0
  219. O[Program#]
  220. G90 G92 X0 Y0
  221. End
  222.  
  223. 1stToolChange
  224. G0 X[H] Y[V]
  225. End
  226.  
  227. Infeed
  228. G[Side] X[H] Y[V] H[DComp] F[FRate]  
  229. end
  230.  
  231. Outfeed
  232. G1 G40 X[H] Y[V]   
  233. end
  234.  
  235. ToolChange
  236. G0 X[H] Y[V]
  237. End
  238.  
  239. EndCode
  240. G0 G90
  241. X0 Y0
  242. M30
  243. %0
  244. End
  245.  
  246. name Generic EDM
  247.  
  248. % 00
  249. ! 00
  250. O 4
  251. N >4
  252. G 2
  253. X ->3.>4
  254. Y ->3.>4
  255. I ->3.>4
  256. J ->3.>4
  257. F >3.2
  258. D 2
  259. M 2
  260.  
  261. ModalLetters X Y Z F R                # List of letters that are modal    
  262.  
  263. ModalGs 0 1 2 3                       # List of g codes that are modal    
  264.  
  265. Sequence#s N 0 1 1                    # Char, freq, incr & start          
  266. First#? N                             # Y or N  'Output 1st sequence no.  
  267. Last#? N                              # Y or N  'Output last sequence no. 
  268.  
  269. HCode X                               # X or X U  'Horizontal char.       
  270. VCode Y                               # Y or Y V  'Vertical char.         
  271. FeedCode F                            # Feed rate char.                   
  272.  
  273. Comment ( )                           # Begin End comment char.           
  274.  
  275. DComp 41 42 40                        # Left, Right & Cancel m codes      
  276. LComp 43 49                           # On & Off codes                    
  277.  
  278. Feed G1                             # Linear move                       
  279. Rapid G0                            # Rapid positioning word            
  280. Cw G2                               # Circular move clockwise           
  281. Ccw G3                              # Circular move counter clockwise   
  282.  
  283. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  284. Inch/MM 70 71                         # Inch & Metric g codes             
  285.  
  286. CtrCode I J                           # I J or R or I J K L               
  287. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  288. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  289.  
  290. Spaces? N                             # Y or N  'Spaces between words     
  291. Incremental? N                        # Y or N  'Inc or abs output        
  292.  
  293.   #Work G
  294.  
  295. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  296.  
  297.   #MaxRad 999 .0005                   # Chordal breakdown value
  298.   #ArcWithSame? N                     # Support XY/UV arc records
  299.   #ArcWithLine? N                     # Support UV arc records
  300.  
  301. Tolerance .0001
  302.  
  303. StartCode                             # Start of the program              
  304. %0
  305. !0 O[Program#]
  306. End
  307.  
  308. 1stToolChange                         # First tool change                 
  309. G0 G92 X0 Y0
  310. X[H] Y[V]
  311. End
  312.  
  313. Infeed                                # Enable cutter comp                
  314. G[Side] X[H] Y[V] D[Dcomp]
  315. end
  316.  
  317. Outfeed                               # Disable cutter comp               
  318. G1 G40 X[H] Y[V]
  319. end
  320.  
  321. ToolChange                            # Secondary tool changes            
  322. M1
  323. G0 X[H] Y[V]
  324. End
  325.  
  326. EndCode                               # End of the program                
  327. M30
  328. %0
  329. End
  330.  
  331.   #LineCode
  332.   #G1 X[H] Y[V] F[Frate]
  333.   #End
  334.  
  335.   #RapidCode
  336.   #G0 X[H] Y[V]
  337.   #End
  338.  
  339.   #CcwCode
  340.   #G3 X[H] Y[V] I[Ival] J[Jval] F[Frate]
  341.   #End
  342.  
  343.   #CwCode
  344.   #G2 X[H] Y[V] I[Ival] J[Jval] F[Frate]
  345.   #End
  346.  
  347.   #Upon
  348.   #End
  349.  
  350. name Japax EDM
  351.  
  352. % 00
  353. / 00
  354. O >4
  355. N >4
  356. G >2
  357. X ->3.>4
  358. Y ->3.>4
  359. Z ->3.>4
  360. A ->3.>4
  361. I ->3.>4
  362. J ->3.>4
  363. K ->3.>4
  364. Q ->3.>4
  365. R ->3.>4
  366. P >40
  367. F >3.1
  368. H >2
  369. D >2
  370. T >2
  371. M >2
  372. S >4
  373.  
  374. ModalLetters X Y Z F R                # List of letters that are modal    
  375.  
  376. ModalGs                               # List of g codes that are modal    
  377.  
  378. Sequence#s N 0 1 1                    # Char, freq, incr & start          
  379. First#? N                             # Y or N  'Output 1st sequence no.  
  380. Last#? N                              # Y or N  'Output last sequence no. 
  381.  
  382. HCode X                               # X or X U  'Horizontal char.       
  383. VCode Y                               # Y or Y V  'Vertical char.         
  384. Dcode Z                               # Depth char.                       
  385. FeedCode F                            # Feed rate char.                   
  386.  
  387. Comment ( )                           # Begin End comment char.           
  388.  
  389. Coolant 8 9 7                         # On, Off & Mist m codes            
  390. DComp 41 42 40                        # Left, Right & Cancel m codes      
  391. LComp 43 49                           # On & Off codes                    
  392.  
  393. Feed G1                             # Linear move                       
  394. Rapid G0                            # Rapid positioning word            
  395. Cw G2                               # Circular move clockwise           
  396. Ccw G3                              # Circular move counter clockwise   
  397.  
  398. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  399.  
  400. Work G                                # Work offset register              
  401.  
  402. CtrCode I J                           # I J or R or I J K L               
  403.  
  404. Spaces? N                             # Y or N  'Spaces between words     
  405.  
  406. Incremental? N                        # Y or N  'Inc or abs output        
  407. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  408. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  409.  
  410. Inch/MM 20 21                         # Inch & Metric g codes             
  411.  
  412. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  413.  
  414. Tolerance .0001
  415.  
  416. StartCode                             # Start of the program              
  417. %0
  418. G[Unitmode]
  419. G92 X0 Y0
  420. End
  421.  
  422. 1stToolChange                         # First tool change                 
  423. G0 X[H] Y[V]
  424. End
  425.  
  426. Infeed                                # Enable cutter comp                
  427. G[Side] X[H] Y[V] A[Lcomp] D[Dcomp]
  428. end
  429.  
  430. Outfeed                               # Disable cutter comp               
  431. G1 G40 X[H] Y[V]
  432. end
  433.  
  434. ToolChange                            # Secondary tool changes            
  435. G0
  436. M1
  437. M[Direct] S[Speed]
  438. G0 X[H] Y[V]
  439. End
  440.  
  441. EndCode                               # End of the program                
  442. A0 D0
  443. G40 M02
  444. %0
  445. End
  446.  
  447. name Mitsubishi H Series EDM
  448.  
  449. % 00
  450. / 00
  451. L >4
  452. N >4
  453. G 2
  454. X ->3.>4
  455. Y ->3.>4
  456. Z ->3.>4
  457. I ->3.>4
  458. J ->3.>4
  459. K ->3.>4
  460. A +->3.>3
  461. E >3
  462. P >40
  463. F >3.1
  464. H >3
  465. D >2
  466. M >2
  467.  
  468. ModalLetters X Y Z F                  # List of letters that are modal    
  469.  
  470. ModalGs 0 1 2 3                       # List of g codes that are modal    
  471.  
  472. Sequence#s N 1 1 1                    # Char, freq, incr & start          
  473. First#? N                             # Y or N  'Output 1st sequence no.  
  474. Last#? N                              # Y or N  'Output last sequence no. 
  475.  
  476. HCode X                               # X or X U  'Horizontal char.       
  477. VCode Y                               # Y or Y V  'Vertical char.         
  478. Dcode Z                               # Depth char.                       
  479. FeedCode F                            # Feed rate char.                   
  480.  
  481. Comment ( )                           # Begin End comment char.           
  482.  
  483. Coolant 8 9 7                         # On, Off & Mist m codes            
  484. DComp 41 42 40                        # Left, Right & Cancel m codes      
  485.  
  486. Feed G1                             # Linear move                       
  487. Rapid G0                            # Rapid positioning word            
  488. Cw G02                              # Circular move clockwise           
  489. Ccw G03                             # Circular move counter clockwise   
  490.  
  491. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  492.  
  493. Work G                                # Work offset register              
  494.  
  495. CtrCode I J                           # I J or R or I J K L               
  496.  
  497. Spaces? Y                             # Y or N  'Spaces between words     
  498.  
  499. Incremental? N                        # Y or N  'Inc or abs output        
  500. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  501. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  502.  
  503. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  504.  
  505. Tolerance .0001
  506.  
  507. StartCode                             # Start of the program              
  508. %0
  509. L[Program#]
  510. G90
  511. G92 X[WorkH] Y[WorkV]
  512. End
  513.  
  514. 1stToolChange                         # First tool change                 
  515. E[Tool]
  516. M80
  517. M82
  518. M84
  519. end
  520.  
  521. Infeed                                # Enable cutter comp                
  522. G[Side] X[H] Y[V] F[FRate] H[DComp] M90
  523. end
  524.  
  525. Outfeed                               # Disable cutter comp               
  526. G1 G40 X[H] Y[V] F20.0 M91
  527. end
  528.  
  529. ToolChange                            # Secondary tool changes            
  530. M00
  531. G90
  532. G92 X[WorkH] Y[WorkV]
  533. E[Tool]
  534. M80
  535. M82
  536. M84
  537. End
  538.  
  539. EndCode                               # End of the program                
  540. M02
  541. %0
  542. End
  543.  
  544. name Sodick EDM
  545.  
  546. : >4
  547. N 4
  548. G 2
  549. g 2 G
  550. X ->3.>4
  551. Y ->3.>4
  552. Z ->3.>4
  553. A >3.>4
  554. I ->3.>3
  555. J ->3.>3
  556. Q >4
  557. R ->3.>4
  558. P 4
  559. F >3.>2
  560. H >4
  561. D >2
  562. T 2
  563. M 2
  564. S >4
  565. C 3
  566. L >2
  567.  
  568. ModalGs 0 1 2 3                       # List of g codes that are modal    
  569.  
  570. Sequence#s N 1 5 5                    # Char, freq, incr & start          
  571. First#? N                             # Y or N  'Output 1st sequence no.  
  572. Last#? N                              # Y or N  'Output last sequence no. 
  573.  
  574. HCode X                               # X or X U  'Horizontal char.       
  575. VCode Y                               # Y or Y V  'Vertical char.         
  576. Feedcode F                            # Feed rate char.                   
  577. Comment '                             # Begin End comment char.           
  578.  
  579. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  580. Coolant 17 27 17                      # On, Off & Mist m codes            
  581. DComp 41 42 40                        # Left, Right & Cancel m codes      
  582. LComp 43 49                           # On & Off codes                    
  583.  
  584. Feed G1                             # Linear move                       
  585. Rapid G0                            # Rapid positioning word            
  586. Cw G2                               # Circular move clockwise           
  587. Ccw G3                              # Circular move counter clockwise   
  588.  
  589. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  590.  
  591. CtrCode I J                           # I J or R or I J K L               
  592.  
  593. Spaces? N                             # Y or N  'Spaces between words     
  594.  
  595. Incremental? N                        # Y or N  'Inc or abs output        
  596. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  597. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  598.  
  599. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  600.  
  601. Tolerance .0001
  602.  
  603. StartCode                             # Start of the program              
  604. :[Program#]
  605. G90
  606. End
  607.  
  608. 1stToolChange                         # First tool change                 
  609. G[Work]
  610. G92 X0 Y0
  611. C207
  612. G40 H0
  613. G50 A0
  614. End
  615.  
  616. Infeed                                # Enable cutter comp                
  617. G[Side] X[H] Y[V]
  618. end
  619.  
  620. Outfeed                               # Disable cutter comp               
  621. G40 G50 G1 X[H] Y[V]
  622. end
  623.  
  624. ToolChange                            # Secondary tool changes            
  625. g91 M5
  626. T90
  627. M00
  628. G90
  629. G0 X[H] Y[V]
  630. M00
  631. End
  632.  
  633. EndCode                               # End of the program                
  634. M2
  635. M99
  636. End
  637.  
  638. name Charmilles EDM 4 Axis
  639.  
  640. % 00
  641. O >4
  642. N >4
  643. G 2
  644. X ->3.>5
  645. Y ->3.>5
  646. U ->3.>5 IncFrom X
  647. V ->3.>5 IncFrom Y
  648. u ->3.>5 U
  649. v ->3.>5 V
  650. H >2
  651. M >2
  652. F 00 ""
  653. W ->3.>5
  654. R ->3.>5
  655. g 2 G
  656. D >2
  657.  
  658. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85  # List of g codes that are modal    
  659.  
  660. Sequence#s N 1 5 5                    # Char, freq, incr & start          
  661. First#? N                             # Y or N  'Output 1st sequence no.  
  662. Last#? Y                              # Y or N  'Output last sequence no. 
  663.  
  664. HCode X U                             # X or X U  'Horizontal char.       
  665. VCode Y V                             # Y or Y V  'Vertical char.         
  666. FeedCode F                            # Feed rate char.                   
  667.  
  668. Comment ( )                           # Begin End comment char.           
  669.  
  670. Coolant 8 9 7                         # On, Off & Mist m codes            
  671. DComp 41 42 40                        # Left, Right & Cancel m codes      
  672. LComp 43 49                           # On & Off codes                    
  673.  
  674. CtrIncremental? N                     # Y or N  'Inc or abs I & J         
  675. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  676.  
  677. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  678.  
  679. Work G                                # Work offset register              
  680.  
  681. Feed G1                             # Linear move                       
  682. Rapid G0                            # Rapid positioning word            
  683. Cw G2                               # Circular move clockwise           
  684. Ccw G3                              # Circular move counter clockwise   
  685.  
  686. CtrCode I J K L
  687.  
  688. Inch/MM 70 71                         # Inch & Metric g codes             
  689.  
  690. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  691.  
  692. MaxRad 999 .0005                      # Chordal breakdown value
  693. ArcWithSame? N                        # Support XY/UV arc records
  694. ArcWithLine? N                        # Support UV arc records
  695.  
  696. Tolerance .0001
  697.  
  698. StartCode                             # Start of the program              
  699. %0
  700. End
  701.  
  702. 1stToolChange                         # First tool change                 
  703. G92 G[Unitmode] X[H] Y[V] W[Val1] R[Val2]
  704. End
  705.  
  706. Infeed                                # Enable cutter comp                
  707. G1 X[H] Y[V] U[H2] V[V2] g[Side] D[Val3]
  708. end
  709.  
  710. Outfeed                               # Disable cutter comp               
  711. G40
  712. end
  713.  
  714. ToolChange                            # Secondary tool changes            
  715. End
  716.  
  717. EndCode                               # End of the program                
  718. M2
  719. End
  720.  
  721. ASK [Val1] " WHAT IS THE Z PLANE OF THE X-Y CONTOUR?"
  722. ASK [Val2] " WHAT IS THE Z PLANE OF THE U-V CONTOUR?"
  723. ASK [Val3] " WHAT IS THE DIAMETER OFFSET NUMBER?"
  724.  
  725. name Elox EDM 4 Axis
  726.  
  727. % 00
  728. O >4
  729. N >4
  730. G >2
  731. X ->3.>5
  732. Y ->3.>5
  733. U ->3.>5   IncFrom X
  734. V ->3.>5   IncFrom Y
  735. I ->3.>5
  736. J ->3.>5
  737. K ->3.>5   IncFrom U
  738. L ->3.>5   IncFrom V
  739. F >3.1
  740. H >2
  741. M >2
  742.  
  743. MaxRad 999 .0005                      # Chordal breakdown value
  744. ArcWithSame? Y                        # Support XY/UV arc records
  745. ArcWithLine? N                        # Support UV arc records
  746.  
  747. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85
  748.  
  749. Sequence#s N 1 1 1              
  750. First#? N
  751. Last#? N
  752.  
  753. HCode X U
  754. VCode Y V
  755. FeedCode F
  756.  
  757. Comment ( )             
  758.  
  759. Spindle 3 4 5           
  760. Coolant 8 9 7           
  761. DComp 41 42 40          
  762. LComp 43 49             
  763.  
  764. Spaces? Y
  765.  
  766. CtrIncremental? Y       
  767. ByQuadrants? N
  768. CtrCode I J K L
  769.  
  770. Feed G1
  771. Rapid G0
  772. Cw G2
  773. Ccw G3
  774.  
  775. Work G
  776.  
  777. Tolerance .0001
  778.  
  779. StartCode
  780. %0
  781. O[Program#]
  782. G90 G18
  783. G92 X0 Y0
  784. End
  785.  
  786. 1stToolChange
  787. G0 X[H] Y[V]
  788. End
  789.  
  790. CWCode
  791. G2 I[Ival] J[Jval] X[H] Y[V]
  792. End
  793.  
  794. CcWCode
  795. G3 I[Ival] J[Jval] X[H] Y[V]
  796. End
  797.  
  798. Infeed
  799. G[Side] X[H] Y[V] H[DComp] F[FRate]  
  800. End
  801.  
  802. Outfeed
  803. G1 G40 X[H] Y[V] 
  804. end
  805.  
  806. ToolChange
  807. G0 X[H] Y[V]
  808. End
  809.  
  810. EndCode
  811. G0 G90
  812. X0 Y0
  813. M30
  814. %0
  815. End
  816.  
  817. name Japax EDM 4 Axis
  818.  
  819. % 00
  820. / 00
  821. O >4
  822. N >4
  823. G >2
  824. X ->3.>4
  825. Y ->3.>4
  826. I ->3.>4
  827. J ->3.>4
  828. K ->3.>4
  829. L ->3.>4
  830. U ->3.>5 IncFrom X
  831. V ->3.>5 IncFrom Y
  832. A ->3.>4
  833. Q ->3.>4
  834. R ->3.>4
  835. P >40
  836. F >1.3
  837. H >2
  838. D >2
  839. T >2
  840. M >2
  841. S >4
  842.  
  843. ModalLetters X Y Z F R                # List of letters that are modal    
  844.  
  845. ModalGs                               # List of g codes that are modal    
  846.  
  847. Sequence#s N 0 1 1                    # Char, freq, incr & start          
  848. First#? N                             # Y or N  'Output 1st sequence no.  
  849. Last#? N                              # Y or N  'Output last sequence no. 
  850.  
  851. HCode X U                             # X or X U  'Horizontal char.       
  852. VCode Y V                             # Y or Y V  'Vertical char.         
  853. FeedCode F                            # Feed rate char.                   
  854.  
  855. Comment ( )                           # Begin End comment char.           
  856.  
  857. Coolant 8 9 7                         # On, Off & Mist m codes            
  858. DComp 41 42 40                        # Left, Right & Cancel m codes      
  859. LComp 43 49                           # On & Off codes                    
  860.  
  861. Feed G1                             # Linear move                       
  862. Rapid G0                            # Rapid positioning word            
  863. Cw G2                               # Circular move clockwise           
  864. Ccw G3                              # Circular move counter clockwise   
  865.  
  866. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  867.  
  868. Work G                                # Work offset register              
  869.  
  870. Spaces? Y                             # Y or N  'Spaces between words     
  871.  
  872. Incremental? N                        # Y or N  'Inc or abs output        
  873. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  874. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  875. CtrCode I J K L
  876.  
  877. Inch/MM 20 21                         # Inch & Metric g codes             
  878.  
  879. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  880.  
  881. MaxRad 999 .0005                      # Chordal breakdown value
  882. ArcWithSame? N                        # Support XY/UV arc records
  883. ArcWithLine? N                        # Support UV arc records
  884.  
  885. Tolerance .0001
  886.  
  887. StartCode                             # Start of the program              
  888. %0
  889. G[Unitmode]
  890. G92 X0 Y0
  891. End
  892.  
  893. 1stToolChange                         # First tool change                 
  894. G0 X[H] Y[V]
  895. End
  896.  
  897. Infeed                                # Enable cutter comp                
  898. G[Side] X[H] Y[V] U[H2] V[V2] A[Lcomp] D[Dcomp]
  899. end
  900.  
  901. Outfeed                               # Disable cutter comp               
  902. G1 G40 X[H] Y[V] U[H2] V[V2]
  903. end
  904.  
  905. ToolChange                            # Secondary tool changes            
  906. G0
  907. M1
  908. M[Direct] S[Speed]
  909. G0 X[H] Y[V]
  910. End
  911.  
  912. EndCode                               # End of the program                
  913. A0 D0
  914. G40 M02
  915. %0
  916. End
  917.  
  918. name Mitsubishi 4 Axis
  919.  
  920. % 00
  921. a >1 Z
  922. b ->3.>5 =
  923. c >1 Z
  924. d ->3.>5 =
  925. e >1 Z
  926. f ->3.>5 =
  927. O >4
  928. N >4
  929. G >2
  930. X ->3.>5
  931. x ->3.>5 U IncFrom X
  932. Y ->3.>5
  933. y ->3.>5 V IncFrom Y
  934.    H ->3.>5 Mult -1    { HDist}
  935.    V ->3.>5 Mult -1             { VDist}
  936.    h ->3.>5
  937.    v ->3.>5
  938. Z >2
  939. u 00 ""                               # to hold last U, V...
  940. v 00 ""
  941. A 00 "" Mult -1                       # to Hold HDist, VDist...
  942. B 00 "" Mult -1
  943. U ->3.>5 IncFrom u Add A
  944. V ->3.>5 IncFrom v Add B
  945. I ->3.>5
  946. J ->3.>5
  947. K ->3.>5   IncFrom U
  948. L ->3.>5   IncFrom V
  949. E >2
  950. F >3.1
  951. h >2 F
  952. H >2
  953. = ->3.>5
  954. M >2
  955.  
  956. ModalLetters F
  957.  
  958. MaxRad 999 .0005                      # Chordal breakdown value
  959. ArcWithSame? Y                        # Support XY/UV arc records
  960. ArcWithLine? N                        # Support UV arc records
  961.  
  962. ModalGs
  963.  
  964. Sequence#s N 0 1 1          Letter, freq, incr, start.
  965. First#? N
  966. Last#? N
  967.  
  968. HCode X U
  969. VCode Y V
  970. FeedCode F
  971.  
  972. Comment ( )
  973.  
  974. Spindle 3 4 5
  975. Coolant 8 9 7
  976. DComp 41 42 40
  977. LComp 43 49
  978.  
  979. Spaces? Y
  980.  
  981. CtrIncremental? Y
  982. ByQuadrants? N
  983. CtrCode I J K L
  984.  
  985. Feed G<1>
  986. Rapid G<0>
  987. Cw G<2>
  988. Ccw G<3>
  989.  
  990.   Work G
  991.  
  992. Ask <Val1> "What is your `Z1' value?" "50"
  993. Ask <Val2> "What is your `Z2' value?" "25"
  994. Ask <Val3> "What is your `Z5' value?" "0"
  995. Ask <Val4> "What is your `H1' value?" "200"
  996.  
  997. Tolerance .0001
  998.  
  999. StartCode
  1000. %<0>
  1001. a<1> b<Val1> c<2> d<Val2> e<5> f<Val3>
  1002. H<1> =<Val4>
  1003. G<90>
  1004. E<1> h<1> H<1>
  1005. G<92> X<0> Y<0>
  1006. End
  1007.  
  1008.  
  1009.   CWCode
  1010.   G<2> I<Ival> J<Jval> X<H> Y<V>
  1011.   End
  1012.  
  1013.   CcWCode
  1014.   G<3> I<Ival> J<Jval> X<H> Y<V>
  1015.   End
  1016.  
  1017. 1stToolChange
  1018. G<0> X<H> Y<V> u<H2> v<V2>
  1019. M<20>
  1020. M<80> M<82> M<84>
  1021. M<90>
  1022. End
  1023.  
  1024. Infeed
  1025. G<1> G<Side> X<H> Y<V> x<H2> y<V2> u<H2> v<V2> H<DComp> F<FRate>
  1026. End
  1027.  
  1028. LineCode
  1029. G<1> A<HDist> B<VDist> X<H> Y<V> U<H2> V<V2> u<H2> v<V2> F<Frate>
  1030. end
  1031.  
  1032. RapidCode
  1033. G<0> A<HDist> B<VDist> X<H> Y<V> u<H2> v<V2>
  1034. end
  1035.  
  1036. Outfeed
  1037. G<0> G<40> A<HDist> B<VDist> X<H> Y<V> U<H2> V<V2>
  1038. end
  1039.  
  1040. ToolChange
  1041. G<0> X<H> Y<V>
  1042. End
  1043.  
  1044. EndCode
  1045. M<2>
  1046. %<0>
  1047. End
  1048.  
  1049. name Sodick EDM 4 Axis
  1050.  
  1051. : >4
  1052. N 4
  1053. G 2
  1054. g 2 G
  1055. X ->3.>4
  1056. Y ->3.>4
  1057. I ->3.>4
  1058. J ->3.>4
  1059. K ->3.>4
  1060. L ->3.>4
  1061. U ->3.>5 IncFrom X
  1062. V ->3.>5 IncFrom Y
  1063. A >3.>4
  1064. Q >4
  1065. R ->3.>4
  1066. P 4
  1067. F >3.>2
  1068. H >4
  1069. D >2
  1070. T 2
  1071. M 2
  1072. S >4
  1073. C 3
  1074.  
  1075. ModalGs 0 1 2 3                       # List of g codes that are modal    
  1076.  
  1077. Sequence#s N 1 5 5                    # Char, freq, incr & start          
  1078. First#? N                             # Y or N  'Output 1st sequence no.  
  1079. Last#? N                              # Y or N  'Output last sequence no. 
  1080.  
  1081. HCode X U                              # X or X U  'Horizontal char.       
  1082. VCode Y V                              # Y or Y V  'Vertical char.         
  1083. Feedcode F                            # Feed rate char.                   
  1084. Comment '                             # Begin End comment char.           
  1085.  
  1086. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  1087. Coolant 17 27 17                      # On, Off & Mist m codes            
  1088. DComp 41 42 40                        # Left, Right & Cancel m codes      
  1089. LComp 43 49                           # On & Off codes                    
  1090.  
  1091. Feed G1                             # Linear move                       
  1092. Rapid G0                            # Rapid positioning word            
  1093. Cw G2                               # Circular move clockwise           
  1094. Ccw G3                              # Circular move counter clockwise   
  1095.  
  1096. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  1097.  
  1098. Spaces? Y                             # Y or N  'Spaces between words     
  1099.  
  1100. Incremental? N                        # Y or N  'Inc or abs output        
  1101. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  1102. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  1103. CtrCode I J K L
  1104. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  1105.  
  1106. MaxRad 999 .0005                      # Chordal breakdown value
  1107. ArcWithSame? N                        # Support XY/UV arc records
  1108. ArcWithLine? N                        # Support UV arc records
  1109.  
  1110. Tolerance .0001
  1111.  
  1112. StartCode                             # Start of the program              
  1113. :[Program#]
  1114. G90
  1115. End
  1116.  
  1117. 1stToolChange                         # First tool change                 
  1118. G[Work]
  1119. G92 X0 Y0
  1120. C207
  1121. G40 H0
  1122. G50 A0
  1123. End
  1124.  
  1125. Infeed                                # Enable cutter comp                
  1126. G[Side] X[H] Y[V] U[H2] V[V2]
  1127. end
  1128.  
  1129. Outfeed                               # Disable cutter comp               
  1130. G40 G50 G1 X[H] Y[V]
  1131. end
  1132.  
  1133. ToolChange                            # Secondary tool changes            
  1134. g91 M5
  1135. T90
  1136. M00
  1137. G90
  1138. G0 X[H] Y[V]
  1139. M00
  1140. End
  1141.  
  1142. EndCode                               # End of the program                
  1143. M2
  1144. M99
  1145. End
  1146.